This guide outlines the process for upgrading SimpleAMM from V1 to V2.
.env:# Deployment accounts
PRIVATE_KEY=xxx
ADMIN=0x...
OPERATORS=["0x123","0x456","0x789"]
EMERGENCY_ADMINS=["0xabc","0xdef"]
MULTISIG=0x...
STORAGE_ADDRESS=0x...
V1_IMPLEMENTATION=0x...
V2_IMPLEMENTATION=0x...
# Contract addresses
STORAGE_ADDRESS=0x... # Existing EternalStorage address
forge script scripts/migration/01_DeployV2.s.sol \
--rpc-url $RPC_URL \
--broadcast \
--verify
# Save the deployed address to .env
V2_IMPLEMENTATION=0x...
forge script scripts/migration/02_UpgradeToV2.s.sol \
--rpc-url $RPC_URL \
--broadcast
forge script scripts/migration/03_UnpauseV2.s.sol \
--rpc-url $RPC_URL \
--broadcast
# Add previous implementation to .env
V1_IMPLEMENTATION=0x...
forge script scripts/migration/Rollback.s.sol \
--rpc-url $RPC_URL \
--broadcast
For any issues during migration, contact the development team: